﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup.aspx.cs" Inherits="Shuba.Web.appsetup.setup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Application Setup</title>
    <link href="../themes/orange/css/main.css" type="text/css" rel="stylesheet" />
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" class="bg_background">
<table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
        <td width="100%" align=center valign=middle class="header_back3"><b>APPLICATION SETUP FOR SALES PROSPECT APPLICATION</b></td>
    </tr>
</table>
<p>&nbsp;</p>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>    
    <asp:Panel ID="Panel2" runat="server">
        <table class="border" border="0" width="50%" cellspacing="0" cellpadding="5" align="center">
            <tr>
                <td class="bg_grid border_side2" colspan=2><b>Logon to Application Setup</b></td>
            </tr>        
            <tr>
                <td class=bg_grid>User Name</td>
                <td class=bg_grid2>
                <asp:TextBox ID="txtusername" runat="server" Width=175px CssClass="text"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class=bg_grid>Password</td>
                <td class=bg_grid2>
                
                <asp:TextBox ID="txtPassword" TextMode=Password runat="server" Width=175px CssClass="text"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="txtPassword" 
                        ErrorMessage="Password is Required"></asp:RequiredFieldValidator>
                    <asp:TextBox ID="txtPass" runat="server" Visible=false></asp:TextBox>
                </td>
            </tr>
           <tr>
                <td class="bg_grid border_side2" colspan=2><asp:Button ID="Button1" class="buttonsmall" runat="server" Text="Submit" onclick="Button1_Click" />&nbsp;<input id="Reset2" class="buttonsmall" type="reset" value="Reset" /></td>
            </tr>            
            </table>
            </asp:Panel>
        
        <br />
        <asp:Panel ID="Panel1" runat="server">        
        <table class="border" width="50%" border="0" cellspacing="0" cellpadding="5" align="center">
            <tr>
                <td class="bg_grid border_side2" colspan=2><b>:: Application Configuration ::</b></td>
            </tr>
            <tr>
                <td class=bg_grid>Application Code</td>
                <td class=bg_grid2>
                <asp:TextBox ID="txtAppCode" runat="server" Width=175px CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtAppCode" ErrorMessage="Application Code is Required"></asp:RequiredFieldValidator>                
                </td>
            </tr>
            <tr>
                <td class=bg_grid>Application Name</td>
                <td class=bg_grid2>
                <asp:TextBox ID="txtAppName" runat="server" Width=175px CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtAppName" ErrorMessage="Application Name is Required"></asp:RequiredFieldValidator>                
                </td>
            </tr>
            <tr>
                <td class=bg_grid>Root Address</td>
                <td class=bg_grid2>
                <asp:TextBox ID="txtAddress" runat="server" Width=175px CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtAddress" ErrorMessage="Root Address is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="bg_grid border_side2" colspan=2><b>Application Setup - Administrator</b></td>
            </tr>
            <tr>
                <td class=bg_grid>Administrator Name 1</td>
                <td class=bg_grid2><asp:TextBox ID="txtAdmin1Name" runat="server" Width=175px CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtAdmin1Name" ErrorMessage="Administrator Name is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>

            <tr>
                <td class=bg_grid>Administrator Name 2</td>
                <td class=bg_grid2><asp:TextBox ID="txtAdmin2Name" runat="server" Width=175px CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtAdmin2Name" ErrorMessage="Administrator Name is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="bg_grid border_side2" colspan=2><b>Server Configuration</b></td>
            </tr>
            <tr>
                <td class=bg_grid>A.D. Server</td>
                <td class=bg_grid2><asp:TextBox ID="txtLDAP" runat="server" Width=175px CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" ControlToValidate="txtLDAP" ErrorMessage="Active Directory Server is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class=bg_grid>DB Server Name</td>
                <td class=bg_grid2><asp:TextBox ID="txtDbServer" runat="server" Width=175px MaxLength=50 CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtDbServer" ErrorMessage="Database Server is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class=bg_grid>DB Name</td>
                <td class=bg_grid2><asp:TextBox ID="txtDbName" runat="server" Width=175px MaxLength=30 CssClass="text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtDbName" ErrorMessage="Database Name is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class=bg_grid>DB User Name</td>
                <td class=bg_grid2><asp:TextBox ID="txtDbUser" runat="server" Width=175px MaxLength=30 CssClass="text"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtDbUser" ErrorMessage="Database User Name is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class=bg_grid>DB Password</td>
                <td class=bg_grid2><asp:TextBox ID="txtDbPassword" TextMode=Password runat="server" Width=175px MaxLength=50 CssClass="text"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="txtDbPassword" ErrorMessage="Database Password is Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="bg_grid border_side2" colspan=2>
                    <asp:Button ID="btnSave" CssClass="buttonsmall" runat="server" Text="Save" onclick="btnSave_Click" />&nbsp;
                    <input id="Reset1" type="reset" class="buttonsmall" value="Reset" />
                </td>
            </tr>
        </table>
        <br /><br />
        <asp:UpdatePanel ID="UpdatePanel1" Visible="false" runat="server" UpdateMode=Conditional>
        <ContentTemplate>
            <table class="border" width="50%" border="0" cellspacing="0" cellpadding="5" align="center">
            <tr>
                <td class="bg_grid border_side2" colspan=2><b>Generate SPADA Encryption Key</b></td>
            </tr>
            <tr>
                <td class=bg_grid>Encryption Key</td>
                <td class=bg_grid2>
                
                <asp:TextBox ID="enckey" TextMode="Password" runat="server" MaxLength=30 Width=300px CssClass="text"></asp:TextBox>
                <br />Please don't use comma (,) as one of key characters<br />
                <asp:TextBox ID="enckey_result" runat="server" Enabled="false" Width=300px CssClass="text"></asp:TextBox><br />
                Please put this key into as value of "enc.code.spada" in Web.Config file
                </td>
            </tr>
            <tr>
                <td class="bg_grid border_side2" colspan=2>
                    <asp:Button ID="btnKey" CssClass="button" runat="server" Text="Generate Key" OnClick="btnKey_Click" />&nbsp;
                </td>
            </tr>
            </table>
        </ContentTemplate>
            <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnKey" EventName="Click"/>
            </Triggers>
        </asp:UpdatePanel>
        <p>&nbsp;</p>
    </asp:Panel>
    </form>
</body>
</html>
